package org.erepublik.company.comparators;

import java.util.Comparator;

import org.erepublik.company.Job;

public class JobComparatorByPriceInGold implements Comparator<Job> {

    @Override
    public int compare(Job o1, Job o2) {
        double comparator = o1.getSalaryInGoldAfterTax() - o2.getSalaryInGoldAfterTax();
        if (comparator < 0)
            return 1;
        if (comparator > 0)
            return -1;
        return 0;
    }

}
